import React from 'react';
import { string, bool, func, node } from 'prop-types';
import { ButtonStyle } from './styledButton';

const Button = (props) => {
    const {
        children,
        size,
        text,
        color,
        bgColor,
        click,
        strong,//是否加粗
        plain//是否为朴素按钮，即是否为空心按钮
    } = props;
    return (
        <ButtonStyle
            size={size}
            color={color}
            bgColor={bgColor}
            plain={plain}
            strong={strong}
            onClick={click}
        >
            {text||children}
        </ButtonStyle>
    );
};


Button.propTypes = {
    size: string,//尺寸，可选值从大到小为large small mini m-mini
    text: string,//按钮内文字
    color: string,//按钮颜色 
    bgColor: string,//背景颜色
    strong: bool,//是否加粗
    plain: bool,//是否为朴素按钮，即是否为空心按钮
    click:func,
    children: node

};


export default Button;
